package com.dili.dd.gpi.enums;

/**
 * 位置标注的级别
 * User: zhaoYuan
 * Date: 14-9-9
 * Time: 下午5:08
 */
public enum PrefixType implements BaseEnumInterface {

    GPI(1,"位置标注命名空间"),GCI(2,"内容标注命名空间");
    private int val;

    private String desc;

    PrefixType(int val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    public int getValue() {
        return val;
    }

    public String getDesc() {
        return desc;
    }

    public static PrefixType getByValue(int val){
        PrefixType[] values = PrefixType.values();
        for (PrefixType value : values) {
            if(value.getValue() == val){
                return value;
            }
        }
        throw new RuntimeException("值为" + val + "的枚举值，在" + PrefixType.class + "中不存在");
    }

}
